var _util = _interopRequireDefault(require("../../public/utils/util")), _childbar = _interopRequireDefault(require("./childbar"));

function _interopRequireDefault(e) {
    return e && e.__esModule ? e : {
        default: e
    };
}

Component({
    behaviors: [ _childbar.default ],
    properties: {
        tabs: Array,
        activeIndex: {
            type: Number,
            value: 0
        }
    },
    data: {},
    ready: function() {
        this.setSiteStyle();
    },
    methods: {
        onTap: function(e) {
            var t = e.currentTarget.dataset, i = t.type, r = t.index;
            +this.data.activeIndex != +r && (this.setData({
                activeIndex: r
            }), this.triggerEvent("click", {
                type: i,
                index: r
            }));
        }
    }
});